package com.ivt.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;
import com.ivt.utils.enums.AuditStatus;

@Entity
@Table(name = "sc_notice")
public class Notice implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "notice_id", unique = true, nullable = false)
	private Long noticeId;

	@Column(name = "notice_title", length = 20, nullable = false)
	private String noticeTitle;

	@Column(name = "notice_explain", length = 200)
	private String explain;

	@Column(name = "content", length = 5000)
	private String content;

	@Column(name = "publish_time")
	private String publishTime;

	@Column(name = "publisher", length = 200)
	private String publisher;

	@Column(name = "status", length = 200)
	private AuditStatus status;

	public AuditStatus getStatus() {
		return status;
	}

	public void setStatus(AuditStatus status) {
		this.status = status;
	}

	public Long getNoticeId() {
		return noticeId;
	}

	public void setNoticeId(Long noticeId) {
		this.noticeId = noticeId;
	}

	public String getNoticeTitle() {
		return noticeTitle;
	}

	public void setNoticeTitle(String noticeTitle) {
		this.noticeTitle = noticeTitle;
	}

	public String getExplain() {
		return explain;
	}

	public void setExplain(String explain) {
		this.explain = explain;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	public String getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(String publishTime) {
		this.publishTime = publishTime;
	}

	public String getPublisher() {
		return publisher;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

	@Override
	public String toString() {
		return "Notice [noticeId=" + noticeId + ", noticeTitle=" + noticeTitle
				+ ", explain=" + explain + ", content=" + content
				+ ", publishTime=" + publishTime + ", publisher=" + publisher
				+ ", status=" + status + "]";
	}

}
